const colors=[
    '#ffffff','#20a0d6','#ff784c','#66cc40','#99ccff','#ccc0ff','#ffffa0','#808080',
    '#c0c0c0','#2080cc','#ff3810','#00a010','#3e9ade','#a098ff','#ffcc20','#000000',
    '#84aaff','#ffff40','#ff2020','#202040','#e08040','#f0c040','#4080c0','#40c0f0',
    '#80ff80','#c08080','#8080ff','#ff80ff','#00a040','#00e060','#a060e0','#c080ff'
];
export class ColorExtraction{
    static textColor(n){return colors[n]??'#000';}
    static normalColor() {return this.textColor(0);}
    static systemColor() {return this.textColor(16);}
    static crisisColor() {return this.textColor(17);}
    static deathColor() {return this.textColor(18);}
    static gaugeBackColor() {return this.textColor(19);}
    static hpGaugeColor1() {return this.textColor(20);}
    static hpGaugeColor2() {return this.textColor(21);}
    static mpGaugeColor1() {return this.textColor(22);}
    static mpGaugeColor2() {return this.textColor(23);}
    static mpCostColor() {return this.textColor(23);}
    static powerUpColor() {return this.textColor(24);}
    static powerDownColor() {return this.textColor(25);}
    static tpGaugeColor1() {return this.textColor(28);}
    static tpGaugeColor2() {return this.textColor(29);}
    static tpCostColor() {return this.textColor(29);}
    static dimColor1() {return 'rgba(0, 0, 0, 0.6)';}
    static dimColor2() {return 'rgba(0, 0, 0, 0)';}
    static mpColor() {return this.normalColor();}
    static tpColor() {return this.normalColor();}
    static pendingColor() {return '#a4ffe0'}

    static hpColor(actor) {
        if (actor.isDead()) {
            return this.deathColor();
        } else if (actor.isDying()) {
            return this.crisisColor();
        } else {
            return this.normalColor();
        }
    }

    static paramchangeTextColor(change) {
        if (change > 0) {
            return this.powerUpColor();
        } else if (change < 0) {
            return this.powerDownColor();
        } else {
            return this.normalColor();
        }
    }
}